Fortran sign function.
It uses slightly different definition for changing sign of a complex number:
Sign Method